/ Assembly List / LJCNetCommon / NetCommon / GetInt64

Namespace - LJCNetCommon


Parameters
value - The value object.

Returns

The long value or zero if the object is null. Also returns zero if the object is not type "long", "int" or "short".

Syntax

C#
public static Int64 GetInt64(Object value)

Gets a long value from an object. (E)

Example

C#
using LJCNetCommon;
        
// Gets a long value from an object.
private static void GetInt64()
{
  // Simulates an Object value like that received from a DataTable.
  long setup = 3;
  object obj = setup;

  // Gets a long value from an object.
  long value = NetCommon.GetInt64(obj);
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.